<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>门派信息</title>
    <style>
        #container {
            width: 80%;
            margin: 10px auto;
        }
        #main dt {
            font-size: 1.5em;
        }
        #main dd {
            font-size: 1.2em;
        }
        #main a {
            text-decoration: none;
            color: blue;
        }
        .nav{
            float: right;
            margin-right: 10px;
        }
    </style>
</head>
<body>
    <div id="container">
        <div class="nav">
            {% if request.session.userid %}
                {{ request.session.username }}&nbsp;&nbsp;<a href="/polls/logout">注销</a>
                {% else %}
                <a href="/polls/login/">请登录</a>
            {% endif %} 

        </div>
        <h1>江湖各大门派信息</h1>
        <hr>
        <div id="main">
            {% for subject  in subjects %}
            <dl>
                <dt>
                    <a href="/polls/teacher/?sno={{ subject.no }}&name={{ subject.name }}">{{ subject.name }}</a>
                    {% if subject.is_hot == 1 %}
                    <img src="/static/images/hot.png">
                    {% endif %}
                </dt>
                <dd>
                    {{ subject.infro }}
                </dd>
            </dl>
            {% endfor %}
        </div>
    </div>
</body>
</html>